import Vue from 'vue'
import { mockSelectList, mockCascaderTree } from '@/constant/index'

Vue.mixin({
  data() {
    return {
      mockSelectList,
      mockCascaderTree
    }
  },
  methods: {
    resetBreadcrumb() {
      this.$store.commit('menus/SET_BREADCRUMB', [])
    },
    setBreadcrumb(routerList) {
      this.$store.commit('menus/SET_BREADCRUMB', routerList)
    },
    routerPush(url) {
      this.$router.push(url)
    },
    log(text) {
      console.log(text)
    },
    routerGo(n) {
      this.$router.go(n)
    },
    routerReplace(url) {
      this.$router.replace(url)
    }
  }
})
